package cn.hss.base;

import java.util.Scanner;

/**switch...case语句
 * @author 作者：HeShaoShuai
 * @Email 邮箱：2569819541@qq.com
 * @Date 日期：2023/4/25 16:19
 * @Package 包名：cn.hss.base
 * @Project 项目名：JavaSE
 * @Version 1.0
 */
public class Demo7 {
	public static void main(String[] args) {
		//键盘录入星期几
		System.out.println("请输入一个整数表示星期几：");
		int week = new Scanner(System.in).nextInt();
		//使用switch语句跟week进行匹配
		switch (week){
			case 1:
				System.out.println("跑步");
				break;
			case 2:
				System.out.println("游泳");
				break;
			case 3:
				System.out.println("慢走");
				break;
			case 4:
				System.out.println("动感单车");
				break;
			case 5:
				System.out.println("拳击");
				break;
			case 6:
				System.out.println("爬山");
				break;
			case 7:
				System.out.println("大吃一顿");
				break;
			default:
				System.out.println("输入错误");
				break;
		}
	}
}
